package de.gameduell.framework.facebook.reporting {
	import de.gameduell.framework.debug.Debug;

	import com.adobe.serialization.json.JSON;

	public class ReportingEvent {
		
		protected var _event:Object;
		protected var _type:String;
		
		public function ReportingEvent(anEventType:String) {
			_event = new Object();
			_type  = anEventType;
		}
		
		public function get eventDataAsJSON():String {
			return JSON.encode(_event);
		}
		
		public function get eventType():String {
			return _type;
		}
		
		public function addEventField(key:String, value:String):void {
			Debug.trace("ReportingEvent::addEventField: " + key + "=" + value, Debug.DEBUG);
			_event[key] = value;
		}
	}
}
